Skip to main content

All Questions

Tagged with
1vote
0answers
119views

Recursive macro in Rust to assemble a node tree

This is my first time writing a somewhat non-trivial declarative + recursive macro in Rust. I drew inspiration from this answer. The goal is to come up with a recursive macro that allows to assemble ...
bluenote10's user avatar
4votes
1answer
447views

tail recursive directory traversal in Rust

Please evaluate and help me understand if my attempted implementation of a tail recursive directory traversal function is actually tail recursive or not. I wrote this from my understanding that a tail ...
nohup's user avatar
2votes
1answer
238views

Finding possible combinations for n<7 with rust

I am trying to learn rust and as such have been redoing some of the challenges on project Rosalind. This one relates to the challenge Enumerating Gene Orders. ...
mega_creamery's user avatar
5votes
1answer
248views

Simple expression evaluator in Rust

What follows is an evaluator for a toy expression language. The language includes functions of a single variable (with lexical binding), along with numbers and a way to apply functions to expressions. ...
William Lewis's user avatar
2votes
1answer
202views

Longest common subsequence — recursion and memoization

...
avamsi's user avatar
0votes
1answer
2kviews

Factorial number in Rust for learning purposes

I'm currently trying to learn the basics of the Rust programming language, to do this my first piece of code after the classic 'Hello World' was a simple recursive Factorial function. This is the ...
Florian Humblot's user avatar
12votes
2answers
4kviews

Recursive Fibonacci in Rust with memoization

I'm trying to come up with an "elegant" way of calculating Fibonacci for number in Rust, using recursion and memoization (self-imposed requirements). This is what I have so far: ...
Armando Pérez Marqués's user avatar
2votes
1answer
340views

Ackermann function in Rust

Using the algorithm at the end of this research paper, I've written an extremely fast 1 Ackermann function in Rust. Can the implementation be made faster? Thoughts: Using a struct makes a lot of ...
Noah Bogart's user avatar
3votes
1answer
361views

Rust recursion pattern in simple cat program

I'm trying to get my head around recursion in Rust. I've put together a basic implementation of cat here to play with the basics. Here's my recursive version: <...
Ian Gilham's user avatar
2votes
1answer
408views

Basic JSON Representation in Rust

This week I started reading "The Rust Programming Language". As I reached the chapters on enumerations and pattern matching I felt I had enough material to put together a simple representation of JSON ...
stefanobaghino's user avatar

close